<?PHP

/*====================================================
 Author: RooTM
------------------------------------------------------
 Web-site: http://weboss.net/
=====================================================*/

if( ! defined( 'DATALIFEENGINE' ) ) {
	die( "Hacking attempt!" );
}

	function check_group($groups, $block, $action = true) {
		global $member_id;
		
		$groups = explode( ',', $groups );
		
		if( $action ) {
			
			if( ! in_array( $member_id['user_group'], $groups ) ) return "";
		
		} else {
			
			if( in_array( $member_id['user_group'], $groups ) ) return "";
		
		}
		
		$block = str_replace( '\"', '"', $block );
		
		return $block;
	
	}

function ShowDate($format, $time_add) {
global $langdate, $config;
$today = strtotime(date("Y-m-d.", time()+ ($config['date_adjust']*60)));
if ($time_add > $today) return "Сегодня в " . date ("H:i:s", $time_add);
elseif ($time_add > ($today - 86400)) return "Вчера в ". date ("H:i:s", $time_add);
else return @strtr(@date($format, $time_add), $langdate);
}

?>